


<h4><b>Beginger A1</b></h4>

<div id="WeekTabs">
    <ul>
        <li><a href="#" onclick='ClickCourse(1);'><b>Week 1</b></a></li>
        <li><a href="#" onclick='ClickCourse(2);'><b>Week 2</b></a></li>
        <li><a href="#" onclick='ClickCourse(3);'><b>Week 3</b></a></li>
        <li><a href="#" onclick='ClickCourse(4);'><b>Week 4</b></a></li>
    </ul>
    <br/>
    <hr>
</div>

<div id="ListLesson">
    <?php
    $getData = new GetData();
    $ListLesson = $getData->GetListLesson();
    $IDUserOnline = elgg_get_logged_in_user_guid();
    $resultStatus = $getData->GetListStatusByIDUser($IDUserOnline);
    $valuelesson1 = 0;
    $valuelesson2 = 0;
    $valuelesson3 = 0;
    $valuelesson4 = 0;
    while ($row = mysql_fetch_array($resultStatus)) {
        if (($row['ID_lesson'] == 1))
            $valuelesson1 = $row['Value'];
        if (($row['ID_lesson'] == 2))
            $valuelesson2 = $row['Value'];
        if (($row['ID_lesson'] == 3))
            $valuelesson3 = $row['Value'];
        if (($row['ID_lesson'] == 4))
            $valuelesson4 = $row['Value'];
    }
    ?>
    <ul>
    <?php
    $List4lesson = array();
    $IDWeekResult = (1 - 1) * 4 + 1;

    while ($row = mysql_fetch_array($ListLesson)) {
        if (($row['ID_Week'] == $IDWeekResult)) {
            array_push($List4lesson, $row['Image']);
            array_push($List4lesson, $row['Name']);
            array_push($List4lesson, $row['ID']);
        }
    }
    ?>
        <?php
        for ($i = 0; $i < 4; $i++) {
            ?>	
            <li>
                <ul>
                    <li><a href="<?php echo elgg_add_action_tokens_to_url($vars['url'] .
                            'action/MyCourse/myLesson').'&id='.$List4lesson[$i * 3+2]; ?>"><img src="<?php echo elgg_get_site_url(); ?>mod/MyCourse/<?php echo $List4lesson[$i * 3]; ?>" /></a></li>
                    <li ><a href="<?php echo elgg_add_action_tokens_to_url($vars['url'] .
                            'action/MyCourse/myLesson').'&id='.$List4lesson[$i * 3+2]; ?>"><b><?php echo $List4lesson[$i * 3 + 1]; ?></b></a></li>
                    <li><img src="<?php echo elgg_get_site_url(); ?>mod/MyCourse/Resources/Tool/status/<?php
        if ($i == 0)
            echo $valuelesson1;
        if ($i == 1)
            echo $valuelesson2;
        if ($i == 2)
            echo $valuelesson3;
        if ($i == 3)
            echo $valuelesson4;
            ?>.jpg" /></li>
                </ul>
            </li>
            <br/>
                    <?php } ?>
    </ul>
</div><!-- end ListLession -->

